<?php


    $mysql = new SaeMysql();


$sql = "insert into info values ('$_POST[name]','$_POST[address]','$_POST[unit]','$_POST[phone]','$_POST[email]')";
if($mysql->runSql($sql)>0){
	echo "插入成功啦！";
}


if ($mysql->errno() != 0)
{
    die("Error:" . $mysql->errmsg());
}

$mysql->closeDb();

?>

<html>
    <meta <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <form method="post" action="info2.php">
    <input type="submit" value="查询同学录"/>
    </form>
</html>
